package com.ldp.designpatterns.study.visitor.impl;

import com.ldp.designpatterns.study.visitor.service.ComputerPartVisitor;

/**
 * @ClassName ComputerVisitor
 * @Description TODO 访问者模式，步骤4 创建实现了访问者类的实体访问者。
 * @Author lindipei
 * @Date 2023/10/17 18:39
 */
public class ComputerVisitor implements ComputerPartVisitor {
    @Override
    public void visit(Mouse mouse) {
        System.out.println("Displaying Mouse.");
    }

    @Override
    public void visit(Keyboard keyboard) {
        System.out.println("Displaying Keyboard.");
    }
}
